#include "auto_feed.h"
#if (COMPLIE_AUTO_FEED == 1)

void thermometer_device_thread(void *param)
{
    user_device_t thermometer = cc_device_get(devices, CC_DEVICE_TYPE_THERMOMETER, 1);
    if (thermometer == CC_NULL)
    {
        cc_log("device is null\r\n");
        cc_thread_delete_by_cb(thermometer_device_thread);
    }
    while (1)
    {
        float value[2];
        thermometer->num_data[0] = 52.5;
        thermometer->num_data[1] = 20.5;
        thermometer->read_cb(thermometer, CC_NULL, CC_SCALE_READ_GRAM, &value);
        cc_log("now value(T:%.2f H:%.2f)\r\n", value[1], value[0]);
        cc_delay(2000);
    }
}
CC_THREAD_REGISTER(thermometer_device_thread, 3, 2500);
#endif